package com.ruoyi.labsafety.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.labsafety.mapper.LabSafetyCheckTargetOrgMapper;
import com.ruoyi.labsafety.domain.LabSafetyCheckTargetOrg;
import com.ruoyi.labsafety.service.ILabSafetyCheckTargetOrgService;

/**
 * 检查目标Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-30
 */
@Service
public class LabSafetyCheckTargetOrgServiceImpl implements ILabSafetyCheckTargetOrgService 
{
    @Autowired
    private LabSafetyCheckTargetOrgMapper labSafetyCheckTargetOrgMapper;

    /**
     * 查询检查目标
     * 
     * @param checkTargtOrgId 检查目标ID
     * @return 检查目标
     */
    @Override
    public LabSafetyCheckTargetOrg selectLabSafetyCheckTargetOrgById(Long checkTargtOrgId)
    {
        return labSafetyCheckTargetOrgMapper.selectLabSafetyCheckTargetOrgById(checkTargtOrgId);
    }

    /**
     * 查询检查目标列表
     * 
     * @param labSafetyCheckTargetOrg 检查目标
     * @return 检查目标
     */
    @Override
    public List<LabSafetyCheckTargetOrg> selectLabSafetyCheckTargetOrgList(LabSafetyCheckTargetOrg labSafetyCheckTargetOrg)
    {
        return labSafetyCheckTargetOrgMapper.selectLabSafetyCheckTargetOrgList(labSafetyCheckTargetOrg);
    }

    /**
     * 新增检查目标
     * 
     * @param labSafetyCheckTargetOrg 检查目标
     * @return 结果
     */
    @Override
    public int insertLabSafetyCheckTargetOrg(LabSafetyCheckTargetOrg labSafetyCheckTargetOrg)
    {
        return labSafetyCheckTargetOrgMapper.insertLabSafetyCheckTargetOrg(labSafetyCheckTargetOrg);
    }

    /**
     * 修改检查目标
     * 
     * @param labSafetyCheckTargetOrg 检查目标
     * @return 结果
     */
    @Override
    public int updateLabSafetyCheckTargetOrg(LabSafetyCheckTargetOrg labSafetyCheckTargetOrg)
    {
        return labSafetyCheckTargetOrgMapper.updateLabSafetyCheckTargetOrg(labSafetyCheckTargetOrg);
    }

    /**
     * 批量删除检查目标
     * 
     * @param checkTargtOrgIds 需要删除的检查目标ID
     * @return 结果
     */
    @Override
    public int deleteLabSafetyCheckTargetOrgByIds(Long[] checkTargtOrgIds)
    {
        return labSafetyCheckTargetOrgMapper.deleteLabSafetyCheckTargetOrgByIds(checkTargtOrgIds);
    }

    /**
     * 删除检查目标信息
     * 
     * @param checkTargtOrgId 检查目标ID
     * @return 结果
     */
    @Override
    public int deleteLabSafetyCheckTargetOrgById(Long checkTargtOrgId)
    {
        return labSafetyCheckTargetOrgMapper.deleteLabSafetyCheckTargetOrgById(checkTargtOrgId);
    }

    @Override
    public int deleteLabSafetyCheckTargetOrgByInstanceId(Long instanceId) {

        return labSafetyCheckTargetOrgMapper.deleteLabSafetyCheckTargetOrgByInstanceId(instanceId);
    }
}
